Skip to content

Server decorations - #20

Merged
elinorbgr merged 3 commits into
masterfrom
server_decorations
Jul 30, 2018
Merged

elinorbgr merged 3 commits into
masterfrom
server_decorations

Conversation

@elinorbgr

Copy link
Copy Markdown
Member

fixes #1

It only work with the xdg-decorations, which works with the stage xdg-shell protocol.

Not sure if there is already a compositor implementing both for testing...

@emersion

Copy link
Copy Markdown

Tested with swaywm/wlroots#1053, seems to work well! To change the compositor's preference, change WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE in rootston/xdg_shell.c line 491 to WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE.

Comment thread src/window/mod.rs Outdated
}

/// Create a new window wrapping a given wayland surface as its main content and using
/// server decorations if available

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set the client's preference to SSD if you prefer to use SSD. Right now the client preference is not set, so the compositor decides.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My goal with that was mostly to aim for "follow the compositor's preference". But yeah, I need to clarify what policy to actually follow.

Comment thread src/window/mod.rs Outdated
} else {
// we must be the decorators, to be able to not
// show any decoration
dec.set_mode(Mode::ClientSide);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be more complicated to implement, but if you don't want to be decorated, you should destroy the decoration object. The compositor always has the last word wrt decoration mode.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, indeed. This will be more convoluted to implement though.

@newpavlov

Copy link
Copy Markdown

Gnome on Wayland officially will not support xdg-decorations.

@elinorbgr

Copy link
Copy Markdown
Member Author

@newpavlov Do you mean this as an opinion against implementing it in SCTK?

My approach is to target maximal compatibility. Gnome has its opinion on how clients should behave and look like, but Gnome is also not the only player in the field. If a compositor supports SSD, I see no downside on using them, especially from the point of view of the users of SCTK-based apps.

@newpavlov

Copy link
Copy Markdown

No, it's just a notice for those who hope to use SSD on Gnome.

@elinorbgr
elinorbgr merged commit b442c27 into master Jul 30, 2018
@trimental trimental mentioned this pull request Aug 15, 2018
@elinorbgr
elinorbgr deleted the server_decorations branch November 12, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate KDE's decoration protocol

3 participants